<template>
  <right-template :title="componentData.title" :tabName="componentData.tabName">
    <el-form class="right-moveable">
      <add-img-con :url="commonAttr.url" comAttr="commonAttr" picAttr="url" :isCrop="true" :isDelete="true" class="margin-left-right-16"></add-img-con>
      <input-normal label="图片地址" v-model="commonAttr.url" @change="onChangeAttr"></input-normal>
      <switch-normal v-model="commonAttr.isFullScreen" label="全屏" @change="onChangeAttr"></switch-normal>
      <color-normal v-model="commonAttr.cornerColor" label="句柄颜色" format="rgb" @change="onChangeAttr"></color-normal>
      <color-normal v-model="commonAttr.borderColor" label="线条颜色" format="rgb" @change="onChangeAttr"></color-normal>
    </el-form>
  </right-template>
</template>

<script setup lang="ts">
import { useWebComponentStore } from '@/store/web/component'

const useWebComponent = useWebComponentStore()

let componentData_: any
const componentData = computed(() => {
  componentData_ = useWebComponent.currentComponentData
  return componentData_
})
let commonAttr_: any
const commonAttr = computed(() => {
  commonAttr_ = useWebComponent.currentComponentData!.commonAttr
  return commonAttr_
})
const onChangeAttr = () => {
  // useWebComponent.updateCurrentComponentData({ commonAttr: commonAttr_ })
}
</script>